package com.mhy.aop.main;

import com.mhy.aop.dao.BookDao;
import com.mhy.aop.dao.impl.BookDaoImpl;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;

public class AopMain {
    public static void main(String[] args) {
        System.out.println("Starting Aop");
        // 1. 创建 Spring ApplicationContext
        ApplicationContext ac = null;
        // 2. 获取 BeanFactory
        BeanFactory beanFactory = null;
        // 3. 获取 BookDao Bean
        BookDao bookDao = new BookDaoImpl();
        // 4. 调用 BookDao 方法
        bookDao.update();
        // 5. 观察 AOP 功能的执行
        return;
    }
}
